home *** CD-ROM | disk | FTP | other *** search
- /* Utils_TextMaster; Utilities */
-
- /* Unit name: Utils_TextMaster.c */
- /* Function: Utilities for the Program specific code. */
- /* History: 5/9/91 Original by Prototyper 3.0 */
-
-
-
- #include "PCommonTextMaster.h" /* Common */
- #include "Common_TextMaster.h" /* Common */
- #include "PUtils_TextMaster.h" /* General Utilities */
-
- #include "Utils_TextMaster.h" /* This file */
-
-
- /* ======================================================= */
-
-
-
- /* ======================================================= */
-
-
- /* Close the input file */
- void Close_The_Input_File()
- {
-
- ErrorCode = FSClose(inputRefNum ); /* Close the file */
- inputRefNum = 0; /* Invalidate the refnum */
- }
-
-
- /* ======================================================= */
-
-
- /* Close the output file */
- void Close_The_Output_File()
- {
-
- ErrorCode = FSClose(outputRefNum ); /* Close the file */
- outputRefNum = 0; /* Invalidata the refnum */
- }
-
-
- /* ======================================================= */
-
-
- /* Open the input file */
- void Open_The_File()
- {
- short NumberOfTypes;
-
- typeList[0] = 'TEXT'; /* Open TEXT files */
- typeList[1] = 'text'; /* Open other files */
- NumberOfTypes = 1; /* Only use first filetype in the list */
- if (Do_The_Open_File(NumberOfTypes)) /* Try to open the file */
- {
-
-
-
- /* ADD in your code here to read the file */
-
-
-
- Close_The_Input_File(); /* Now close this file */
- }
- }
-
-
- /* ======================================================= */
-
-
- /* Save the file */
- void Save_The_File()
- {
-
- if (Do_The_Save_File('????', 'TEXT')) /* Try to save the file */
- {
-
-
-
- /* ADD in your code here to save the file */
-
-
-
- Close_The_Output_File(); /* Now close this file */
- }
- }
-
-
- /* ======================================================= */
-
-
-
- /* ======================================================= */
-
-